// Package errcode 错误处理包
package errcode

import "errors"

const (
	codeAuthCheckToken = iota + 100001
	codeBindFail
	codeAuthCheckTokenTimeOut
	codeAuth
	codePermissionDenied
	codeParamTypeError
	codeNoResult
	codeTimeout
	codeUsernameExist
	codeLoginFail
)

var (
	ErrInternal       = errors.New("服务器内部错误")
	ErrAuthCheckToken = errors.New("解析TOKEN失败")
)

var (
	ErrTooManyRequest            = errors.New("服务器繁忙")
	ErrAuthCheckTokenTimeOut     = errors.New("TOKEN过期")
	ErrAuth                      = errors.New("TOKEN错误")
	ErrPermissionDenied          = errors.New("权限不足")
	ErrParamTypeError            = errors.New("参数错误")
	ErrUsernameHadBeenRegistered = errors.New("用户名已被注册")
	ErrLoginFail                 = errors.New("登录失败")
)
